package com.crm.service.impl.sendRoyaltyManager;

import com.crm.dao.mapper.customMapper.sendRoyaltyManager.SendRoyaltyLogCustomMapper;
import com.crm.dao.mapper.sendRoyaltyManager.OrderSendRoyaltyLogMapper;
import com.crm.model.entity.sendRoyaltyManager.OrderSendRoyaltyLog;
import com.crm.model.vo.sendRoyaltyManager.OrderSendRoyaltyLogVO;
import com.crm.service.sendRoyaltyManager.SendRoyaltyLogDbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:chaifuyou
 * @Date: 2021/5/27 10:56
 */
@Service
public class SendRoyaltyLogDbServiceImpl implements SendRoyaltyLogDbService {

    @Autowired
    private SendRoyaltyLogCustomMapper sendRoyaltyLogCustomMapper;

    @Autowired
    private OrderSendRoyaltyLogMapper orderSendRoyaltyLogMapper;

    /**
     * 提成发放修改日志
     * @param sendRoyaltyLog
     */
    @Override
    public void addSendRoyaltyLog(OrderSendRoyaltyLog sendRoyaltyLog) {
        orderSendRoyaltyLogMapper.insert(sendRoyaltyLog);
    }

    /**
     * 查询提成发放修改记录
     * @param orderId
     * @param order
     * @return
     */
    @Override
    public List<OrderSendRoyaltyLogVO> selectSendRoyaltyLogList(String orderId, String order) {
        return sendRoyaltyLogCustomMapper.selectSendRoyaltyLogList(orderId,order);
    }
}
